using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Configuration;

using IDAL;
using Entities;

namespace Bll
{
    public class CustomerBll
    {
        public IList<CustomerInfo> GetAll()
        {
            ICustomerDAO dal = (ICustomerDAO)AssemblyLoader.Load("CustomerDAO");
            return dal.GetAll();
        }

        public bool Insert(CustomerInfo cust)
        {
            ICustomerDAO dal = (ICustomerDAO)AssemblyLoader.Load("CustomerDAO");
            return dal.Insert(cust);
        }

        public bool Update(CustomerInfo cust)
        {
            ICustomerDAO dal = (ICustomerDAO)AssemblyLoader.Load("CustomerDAO");
            return dal.Update(cust);
        }

        public bool Delete(CustomerInfo cust)
        {
            ICustomerDAO dal = (ICustomerDAO)AssemblyLoader.Load("CustomerDAO");
            return dal.Delete(cust);
        }
        public CustomerInfo GetByUserName(string username)
        {
            ICustomerDAO dal = (ICustomerDAO)AssemblyLoader.Load("CustomerDAO");
            return dal.GetByUserName(username);
        }
    }
}
